﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Vehicle.Web.Pages
{
    /// <summary>
    /// Copyright (C) M-Tear团队
    /// 文 件 名：Right.aspx.cs
    /// 版    本：v1.00.0000
    /// 创建标识：2009-08-27   Created by 孙成杰 V1.00.0000
    /// 功能说明：首页类
    /// 注意事项：无
    /// 
    /// 更新记录：
    /// 
    /// </summary>
    public partial class Right : Vehicle.Web.Component.PageBase
    {
        #region---基本变量实例化---
        BLL.Post b_Post = new Vehicle.BLL.Post();
        Model.ComponentsInfo m_ComponentsInfo = new Vehicle.Model.ComponentsInfo();
        #endregion

        #region---基本操作---
        /// <summary>
        /// 页面加载事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                RepeaterBind();
            }
        }
       /// <summary>
       /// 最新公告Repeater绑定
       /// </summary>
        protected void RepeaterBind()
        {
            m_ComponentsInfo.startIndex = 0;//公告起始条数
            m_ComponentsInfo.endIndex = 12;//公告结束条数
            m_ComponentsInfo.tableName = "Post";//表名
            m_ComponentsInfo.condition = "1";//条件一
            m_ComponentsInfo.result = "1";//条件二
            m_ComponentsInfo.order = "P_ID";//排序条件
            Rept.DataSource = b_Post.GetAllSearch(m_ComponentsInfo).DefaultView;//最新公告绑定
            Rept.DataBind();

        }
        #endregion
    }
}
